package com.tchy.cloud.entity;

import org.jeecgframework.web.system.pojo.base.TSUser;
import org.jeecgframework.web.tcdev.entity.TArticle;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by zjy on 2015/12/31.
 */
@Entity
@Table(name = "t_push_records", schema = "")
public class TPushRecords {
    private Integer id;
    private String ticker;
    private String title;
    private String content;
    private Integer objectType;
//    private TArticle article;
    private TSUser sender;
    private String receiver;
    private Date createTime;
    private String receiverIds;
    private String objectId;

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ticker")
    public String getTicker() {
        return ticker;
    }

    public void setTicker(String ticker) {
        this.ticker = ticker;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "object_type")
    public Integer getObjectType() {
        return objectType;
    }

    public void setObjectType(Integer objectType) {
        this.objectType = objectType;
    }



    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "sender")
    public TSUser getSender() {
        return sender;
    }

    public void setSender(TSUser sender) {
        this.sender = sender;
    }

    @Basic
    @Column(name = "receiver")
    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "receiver_ids")
    public String getReceiverIds() {
        return receiverIds;
    }

    public void setReceiverIds(String receiverIds) {
        this.receiverIds = receiverIds;
    }

//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "object_id")
//    public TArticle getArticle() {
//        return article;
//    }
//
//    public void setArticle(TArticle article) {
//        this.article = article;
//    }

    @Basic
    @Column(name = "object_id")
    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }
}
